//
//  MYSearchBar.m
//  奇闻
//
//  Created by 似水灵修 on 14-11-24.
//  Copyright (c) 2014年 MingYueGuCheng. All rights reserved.
//

#import "MYSearchBar.h"

@implementation MYSearchBar

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.background = [UIImage resizedImageWithNamed:@"searchbar_textfield_background"];
        self.clearButtonMode = UITextFieldViewModeAlways;
        self.font = [UIFont systemFontOfSize:12];
        
        UIImageView *leftV = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"searchbar_textfield_search_icon"]];
        leftV.contentMode = UIViewContentModeCenter;
        leftV.width += 10;
        self.leftView = leftV;
        self.leftViewMode = UITextFieldViewModeAlways;
    }
    return self;
}
@end
